<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="../css/index.css" />
    <link rel="stylesheet" href="../css/cart.css" />
  </head>
  <body>
    <header class="site-header"></header>

    <div class="home">
      <ul>
        <li>首页</li>
      </ul>
    </div>
    <ul class="operation">
      <li>商品信息</li>
      <li>单价</li>
      <li>数量</li>
      <li>金额</li>
      <li>操作</li>
    </ul>

    <main>
      <div class="viscous">
        <b><input type="checkbox" value="" class="check_all" /> 全选</b>
        <span class="combined">合计&nbsp;(不含运费)：&nbsp;&nbsp;<i>0</i></span>
        <a class="settlement">结&nbsp;算</a>
      </div>
    </main>

    <!-- 购物车商品渲染模板 -->
    <script type="text/html" id="cart-template">
      {{each cart prod}}
      <div class="table" data-id="{{prod.id}}" data-prod="{{prod}}">
        <div class="tbody">
          <input type="checkbox" class="ipt prod_check" />
          <img src="{{prod.image}}" />
          <p>{{prod.title}}</p>
          <div class="price">
            <span>￥<i>{{prod.price}}</i></span>
          </div>
          <div class="number">
            <button class="minus">-</button>
            <input
              type="number"
              value="{{prod.amount}}"
              size="2"
              class="amount"
            />
            <button class="plus">+</button>
          </div>
          <div class="total">
            <span>￥<i>{{(prod.price * prod.amount).toFixed(2)}}</i></span>
          </div>
          <div>
            <span class="operation1" data-id="{{prod.id}}">删除</span>
          </div>
        </div>
      </div>
      {{/each}}
    </script>
    <script src="../libs/requirejs/require.js" data-main="../js/cart"></script>
  </body>
</html>
